The present invention relates to a motion vector detecting device used for motion picture encoding.
Detection of motion vectors is accomplished by using a block matching operation in motion picture compression techniques such as MPEG. This involves block matching between a block 103 in an object frame 101 to be encoded (hereinafter referred to as object block) and a block in a search area 104 in the other reference frame 102, both blocks being separated from each other with respect to time and detecting the relative position of the blocks having the highest correlation as a motion vector 105 as shown in FIG. 1.
If it is assumed that the dimension of the object block is 8 by 8 and the range of vector detection is +3 to xe2x88x924 in both horizontal and vertical direction, the range of the reference pixels which are required for detecting a motion vector in one object block would be (8+3+4)xc3x97(8+3+4)=15xc3x9715. Hereinafter the necessary range of reference pixels will be referred to as xe2x80x9csearch areaxe2x80x9d.
If the pixel values of the object block is represented as T(i) (i=0 . . . , 63) and the pixel values of one object block Rk is represented as Rk(j) (J=0 . . . , 63), the evaluation value of one block matching operation (AE) is represented by the following equation.   AEk  =            ∑              i        =        0            63        ⁢          "LeftBracketingBar"                        T          ⁡                      (            i            )                          -                  Rk          ⁡                      (            i            )                              "RightBracketingBar"      
In the equation, AEk denotes the evaluation value. The values are determined in the search area. The position of block which assumes the minimum value among the values is determined as a motion vector.
Encoding of a frame is conducted by sequentially performing such processing for the object block.
Since, for a fast moving picture, a wider detection range of the motion vector provides a higher encoding efficiency, a wider search area is more advantageous.
For this purpose, it is conceivable to widen the search area to assign the processing of the different search areas to each of a plurality of motion vector detecting circuits for the same object block.
This will be described with reference to the drawings.
FIG. 2 is a block diagram showing the prior art. The pixels of an object are input from 201 and are temporarily stored in an object pixel memory 202. The pixels of a reference frame are input from 203 and are stored in reference pixel memories 204 through 205.
n denotes the number of ME circuits. Vector detection is carried out by providing the pixel data to motion vector detecting circuits (hereinafter abbreviated as xe2x80x9cME circuitxe2x80x9d) 206 to 207 according to a predetermined sequence.
Based on the results from these ME circuits, the minimum value of AE is ultimately determined as a motion vector by a vector selecting circuit 208 and is output from 209.
The way of the operation will be described in detail with reference to drawings. It is assumed that the dimension of an object block is m by m pixels and dimension of a search area is 3m by 3m pixels. It is also assumed that each of the ME circuits be capable of conducting vector detection in a search area of 3m by 3m pixels for a block of m by m pixels.
Now, a case in which n=1, that is, only one ME circuit is provided, will be described with reference to FIG. 3. A half tone dotted block in FIG. 3 denotes an object block and the area which is encircled by a solid line around the object block is a search area.
Motion vector detection is conducted by controlling the device to apply the object block data and the search area data to the ME circuit 206. At time t0 in FIG. 3A, the motion vector for the object block 301 in position i is detected at its periphery 302.
At the t1 which is subsequent block processing time, the motion vector for the object block 303 in position i+1 is detected in its peripheral search area 304 as shown in FIG. 3B.
Similarly, motion vectors will be successively determined for blocks in position i+2, i+3, . . . so on.
Since only one ME circuit is provided in this example, no vector selecting circuit 208 is necessary and an output of the ME circuit may be output as a result as it is.
Now, a case in which the search area is widened by providing two ME circuits (n=2) will be described with reference to FIG. 4.
In this case, the object block is a netted block 40 as is similar to the former case. The search area is widened by assigning the search area to each of two ME circuits.
In FIG. 4A, the whole search area 202 is divided into sub-search areas 403 and 404. The respective data are separately applied to ME circuits 206 and 207 from the reference pixel memories 204 and 205 in FIG. 2, respectively. The data of the object block 401 is simultaneously applied to both ME circuits from the object pixel memory 202. Motion vectors of difference search areas can be determined by respective circuits.
The motion vectors and the evaluation values of the block matching (for example AE) are input to the vector selecting circuit 208 and a motion vector having less evaluation value is ultimately output from 209.
The above-mentioned operation allows the motion vector to be detected from a search area having 5m by 3m pixels for the object block of m by m pixels.
The search areas 403 and 404 partially overlap with each other. It is apparent that an area which is wider by one block width could be covered if the search areas were assigned so that they did not overlap with each other as shown in FIG. 4B. Such assignment is impossible since motion vector detection can not be performed for a candidate block in position 409.
The reason why such assignment is impossible is that the right end position of the candidate block in the left sub-search area 405 is a position in 406 and the left end position of the candidate block in the right sub-search area 407 is a position 408 and thus detection of a motion vector could not be performed for either sub-search area, for example, for the candidate block in position 409.
Motion vectors can be detected from a wider search area than that in FIGS. 3A to 3C by successively repeating the above-mentioned operation for each object block as is similar to FIGS. 3A to 3C.
A motion vector detecting device which is based upon the above-mentioned concept is disclosed in Japanese laid-Open Patent Publication No. 7-288818.
In the embodiment of the invention disclosed in the cited Japanese Patent Publication, widening of the search area is achieved by dividing the search area into four sub-areas, applying respective data on the sub-areas to respective different ME circuits and applying data on object blocks to respective ME circuits while delaying them appropriately, resulting in reduction in hardware.
In the above-mentioned method, the memory capacity increases in proportion with the search area since it is necessary to store all pixel data of the search areas in memories. Since a longer period of time is taken for the pixel data to be transferred to a reference pixel memory, longer period of time for processing is required.
It is an object of the present invention to provide a motion vector detecting device comprising an object pixel memory for holding pixels of an object block to be encoded; a reference pixel memory for holding pixels of a search area of a reference frame; a plurality of motion vector detecting circuit having a predetermined search area; and a motion vector selecting circuit for selecting optimal motion vector from the outputs from said motion vector detecting circuits, and characterized in that the pixel data of different object block are applied to the plurality of vector detecting circuits from said object pixel memory, in that the pixel data of the predetermined search area are commonly applied to all motion vector detecting circuit from said reference pixel memory, whereby a motion vector can be detected in a wider area by selecting/comparing output from the plurality of motion vector detecting circuits by said motion vector selecting circuit in an appropriate timing relationship.